//
//  CollectionResult.swift
//  ShopIOS
//
//  Created by Apple on 2019/8/12.
//  Copyright © 2019 Apple. All rights reserved.
//

import Foundation
import SwiftyJSON
struct CollectionResult {
    var Success: Bool = false
    var Total: Int = 0
    var Data = [CollectionData]()
    
    init(json: JSON) {
        Success = json["Success"].boolValue
        Total = json["Total"].intValue
        Data = json["Data"].arrayValue.compactMap({ CollectionData(json: $0)})
    }
}

struct CollectionData {
    var Evaluation: Int = 0
    var SalePrice: String?
    var Image: String?
    var categoryId: Int = 0
    var ProductName: String?
    var Id: Int = 0
    
    init(json: JSON) {
        Evaluation = json["Evaluation"].intValue
        SalePrice = json["SalePrice"].stringValue
        Image = json["Image"].stringValue
        categoryId = json["categoryId"].intValue
        ProductName = json["ProductName"].stringValue
        Id = json["Id"].intValue
    }
}
